<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
                    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<?php
session_start();
include 'connect.php';

$memberid= mysql_real_escape_string($_POST["MemberId"]);
$name = mysql_real_escape_string($_POST["Name"]);
$email = mysql_real_escape_string($_POST["Email"]);
$phone = mysql_real_escape_string($_POST["Phone"]);

If (isset($_POST["Update"]))
{
  $sql="UPDATE members SET Name='$name',Email='$email',Phone=$phone WHERE MemberID=".$_SESSION['MemberID'];
  $result = "Successfully updated: MemberID: $memberid, Name: $name, Email: $email, Phone: $phone";
}
elseif (isset($_POST["Delete"]))
{
  $sql="DELETE FROM members WHERE MemberID=".$_SESSION['MemberID'];
  $result = "Successfully deleted: idBooks: $memberid, Author: $name, Title: $email, Price: $phone";
}
mysql_query($sql);
if (!mysql_query($sql,$connection))
  {
  die('Error: ' . mysql_error() . 'in query '.$sql);
  }
else {
 echo $result;
}
mysql_close($connection);
?>
<p>
<a href="welcome.php">Home Page</a>
</p>
</body>
</html>